[Monitors] Run monitor check
curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"size_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"os_name": "<string>",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check"
payload = {
"name": "<string>",
"size_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"os_name": "<string>",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
size_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
image_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
os_name: '<string>',
vpc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tags: ['<string>']
})
};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'size_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'image_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'os_name' => '<string>',
'vpc_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitor": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checked_at": "2023-11-07T05:31:56Z",
"latency_ms": "<string>",
"response_code": "<string>",
"error_message": "<string>"
}Compute
[Monitors] Run monitor check
POST
/
v1
/
organizations
/
{organization_id}
/
projects
/
{project_id}
/
compute
/
instances
/
{id}
/
monitors
/
{monitor_id}
/
check
[Monitors] Run monitor check
curl --request POST \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"size_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"os_name": "<string>",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check"
payload = {
"name": "<string>",
"size_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"os_name": "<string>",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
size_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
image_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
os_name: '<string>',
vpc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tags: ['<string>']
})
};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'size_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'image_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'os_name' => '<string>',
'vpc_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}/monitors/{monitor_id}/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"size_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"image_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"os_name\": \"<string>\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"monitor": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checked_at": "2023-11-07T05:31:56Z",
"latency_ms": "<string>",
"response_code": "<string>",
"error_message": "<string>"
}Authorizations
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Path Parameters
A UUID string identifying this Instance.
Unique identifier of the monitor.
Body
application/json
Instance hostname
Maximum string length:
255Operating system name
Maximum string length:
100free- Freeone_time- One Timehourly- Hourlymonthly- Monthlyquarterly- Quarterlysemi_annually- Semi-Annuallyannually- Annuallybiennially- Bienniallytriennially- Triennially
Available options:
free, one_time, hourly, monthly, quarterly, semi_annually, annually, biennially, triennially Custom tags
Maximum string length:
50Response
200 - application/json
up- Updown- Downdegraded- Degradedpending- Pending
Available options:
up, down, degraded, pending Pattern:
^-?\d{0,8}(?:\.\d{0,2})?$Maximum string length:
50⌘I

